import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
//导入全局自定义指令
import { myDirective } from './directives/index.js'
//导入路由
import router from './router'
import { createPinia } from 'pinia'
// const app = createApp(App)


//注册自定义组件
myDirective(createApp(App));
// 4 注册路由
// app.use(router)

//注册pina
const pinia = createPinia();

/**
 * 使用creatApp来创建一个vue的实例,app.vue就是根组件
 * 然后调用mount方法，将app组件渲染到id为app的div上
 */
// app.mount('#app')

//链式调用   这种不好维护
createApp(App).use(router).use(pinia).mount('#app')

